package com.mashibing.service;

import com.mashibing.internalcommon.dto.OrderInfo;
import com.mashibing.internalcommon.dto.ResponseResult;
import com.mashibing.internalcommon.request.DriverGrabRequest;
import com.mashibing.internalcommon.request.OrderRequest;

public interface OrderService {
    /**
     * 乘客下单
     * @param orderRequest
     * @return
     */
    ResponseResult addOrder(OrderRequest orderRequest);


    /**
     * 派送订单
     *
     * @param orderInfo
     * @return
     */
    boolean dispatchOrder(OrderInfo orderInfo);

    /**
     * 去接乘客
     * @param orderRequest
     * @return
     */
    ResponseResult toPickUpPassenger(OrderRequest orderRequest);

    /**
     * 到达乘客上车点
     * @param orderRequest
     * @return
     */
    ResponseResult arrivedDeparture(OrderRequest orderRequest);

    /**
     * 司机接到乘客
     * @param orderRequest
     * @return
     */
    ResponseResult pickUpPassenger(OrderRequest orderRequest);

    /**
     * 乘客到达目的地，行程终止
     * @param orderRequest
     * @return
     */
    ResponseResult passengerGetOff(OrderRequest orderRequest);

    /**
     * 支付完成
     * @param orderRequest
     * @return
     */
    ResponseResult pay(OrderRequest orderRequest);

    /**
     * 订单取消
     * @param orderId
     * @param identity
     * @return
     */
    ResponseResult cancel(Long orderId, String identity);

    /**
     * 司机发起收款
     * @param orderRequest
     * @return
     */
    ResponseResult pushPayInfo(OrderRequest orderRequest);

    /**
     * 根据订单id查询订单详情
     * @param orderId
     * @return
     */
    ResponseResult<OrderInfo> detail(Long orderId);

    /**
     * 乘客向司机发送订单
     * @param orderRequest
     * @return
     */
    ResponseResult book(OrderRequest orderRequest);

    /**
     * 司机抢单
     * @param driverGrabRequest
     * @return
     */
    ResponseResult driverGrab(DriverGrabRequest driverGrabRequest);

}
